package chpt02;

import java.util.Scanner;
import java.math.BigDecimal;

public class FloatCal {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			Double x=sc.nextDouble();
			Double y=sc.nextDouble();
			BigDecimal v1=new BigDecimal(Double.toString(x));
			BigDecimal v2=new BigDecimal(Double.toString(y));
			System.out.println(v1.add(v2));
			System.out.println(v1.multiply(v2));
		}
		sc.close();
	}

}
